package com.eazy.lkv2.web.service.system.impl;

import java.util.List;
import java.util.Map;

import org.apache.shiro.authc.UsernamePasswordToken;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.eazy.lkv2.web.entity.User;
import com.eazy.lkv2.web.mapper.system.UserMapper;
import com.eazy.lkv2.web.service.system.SystemUserService;
import com.rework.joss.persistence.convention.BaseDao;

@Service
public class SystemUserServiceImpl extends BaseDao<User, String> implements SystemUserService {

	@Autowired
	private UserMapper userMapper;
	
	@Override
	public boolean checkLogin(UsernamePasswordToken token) {
		return userMapper.checkLogin(token.getUsername(),String.valueOf(token.getPassword()));
	}

	@Override
	public User getUserInfo(String username) {
		return userMapper.getUserInfo(username);
	}

	@Override
	public List<Map<String, Object>> selectUser() {
		return userMapper.selectUser();
	}

}
